package com.zgy.myshellcommand.enums;

import java.nio.charset.StandardCharsets;

public enum F2eOptionsEnum {
    Command(-1,"FileHandler",null,"f2e",null,"一个可以把文件中的格式化数据写入到Excel表格的命令", null, false, null),

    Cmd(1,"FileHandler",'c',"cmd","cmd","命令行参数模式", null, true, "c"),
    ModuleExcel(2,"FileHandler",null,"ModuleExcel","ModuleExcel","模板表<仅支持Excel*.xlsx版本>", null, false, null),
    InsertExcel(3,"FileHandler",null,"InsertExcel","InsertExcel","待写入表", null, false, null),
    CommitRow(4,"FileHandler",null,"CommitRow","CommitRow","每次提交的行数", "1000", false, null),
    SheetName(5,"FileHandler",null,"SheetName","SheetName","sheet页名称", "Sheet1", false, null),
    DataFileName(6,"FileHandler",null,"DataFileName","DataFileName","数据文件名（全路径）", null, false, null),
    DataFileFieldSeparator(7,"FileHandler",null,"DataFileFieldSeparator","DataFileFieldSeparator","数据文件分隔符（全路径）", "\t", false, null),
    DataFileCharSet(8,"FileHandler",null,"DataFileCharSet","DataFileCharSet","数据文件字符集编码", StandardCharsets.UTF_8.toString(), false, null),
    DataFileNumberTypeCols(9,"FileHandler",null,"DataFileNumberTypeCols","DataFileNumberTypeCols","数据文件数字类型的列集合,分隔", "[]", false, null),
    ExcelStartRowNum(10,"FileHandler",null,"ExcelStartRowNum","ExcelStartRowNum","表格sheet页开始写入的行数", "0", false, null),
    ExcelStartColNum(11,"FileHandler",null,"ExcelStartColNum","ExcelStartColNum","表格sheet页开始写入的列数", "0", false, null),
    CmdEx(12,"FileHandler",'c',"cmdEx","cmdEx","举个栗子", "for example:--ModuleExcel /ModuleExcelPath/ModuleExcel.xlsx --InsertExcel /InsertExcel/InsertExcel.xlsx --CommitRow 100 --SheetName Sheet1 --DataFileName /DataFileName/DataFileName.txt --DataFileNameFieldSeparator , --DataFileCharSet GBK --DataFileNumberTypeCols [1,2,3] --ExcelStartRowNum 0 --ExcelStartColNum 0", false, null),

    file(13,"FileHandler",'f',"file","file","json文件配置模式", null, true, "f"),
    JsonPath(14,"FileHandler",null,"JsonPath","JsonPath","json文件路径", null, false, null),
    JsonPathCharSet(15,"FileHandler",null,"JsonPathCharSet","JsonPathCharSet","JsonPath文件的字符编码", StandardCharsets.UTF_8.toString(), false, null),
    JsonFormat(16,"FileHandler",null,"JsonFormat","JsonFormat","json格式<所有key值不能省略>", "{\"jobs\": [{\"ModuleExcel\": null,\"InsertExcel\": \"/Users/zhengguiyang/File/test.xlsx\",\"CommitRow\": 100,\"sheetConfigList\": [{\"SheetName\": \"Sheet1\",\"DataFileName\": \"/Users/zhengguiyang/File/test.txt\",\"DataFileFieldSeparator\": \",\",\"DataFileCharSet\": \"GBK\",\"DataFileNumberTypeCols\": [2,3],\"ExcelStartRowNum\": 1,\"ExcelStartColNum\": 1}]}]}", false, null),
    FileEx(17,"FileHandler",'f',"fileEx","ex","举个栗子", "for example: -f --JsonPath /JsonPath/jobs.json", false, null),
    ;

    private int id;
    private final String group;
    private final Character shortName;
    private final String longName;
    private final String args;
    private final String description;
    private final String defaultValue;
    private final boolean subCommand;
    private final String subCommandName;



    F2eOptionsEnum(int id, String group, Character shortName, String longName, String args, String description, String defaultValue, boolean subCommand, String subCommandName) {
        this.shortName = shortName;
        this.longName = longName;
        this.args = args;
        this.description = description;
        this.group = group;
        this.id = id;
        this.defaultValue = defaultValue;
        this.subCommand = subCommand;
        this.subCommandName = subCommandName;
    }

    public Character getShortName() {
        return shortName;
    }

    public String getLongName() {
        return longName;
    }

    public String getArgs() {
        return args;
    }

    public String getDescription() {
        return description;
    }

    public String getGroup() {
        return group;
    }

    public int getId() {
        return id;
    }

    public String getDefaultValue() {
        return defaultValue;
    }
    
    public boolean isSubCommand() {
        return subCommand;
    }

    public String getSubCommandName() {
        return subCommandName;
    }
}
